package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpHRNewHirePageUtil extends SeleniumPageUtil{

	public final static By NEW_HIRE_SPAN_TITLE = By.id("ctl44_lblTitle");
	public final static By NEW_HIRE_LINK_NEW = By.id("ctl44_btnNew");
	public final static By NEW_HIRE_SPAN_SCOPE = By.id("ctl44_lblScope");
	public final static By NEW_HIRE_SELECT_SCOPE = By.id("ctl44_ddlScope");
	public final static By NEW_HIRE_LI_STEP1 = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[1]/li");
	public final static By NEW_HIRE_LI_STEP2 = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[2]/li");
	public final static By NEW_HIRE_LI_STEP3 = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[3]/li");
	public final static By NEW_HIRE_LI_STEP4 = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[4]/li");
	public final static By NEW_HIRE_LI_STEP5 = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[5]/li");
	public final static By NEW_HIRE_LI_OK = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[6]/li[1]");
	public final static By NEW_HIRE_LI_VOID = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[6]/li[2]");
	public final static By NEW_HIRE_LI_ALERT = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[6]/li[3]");
	public final static By NEW_HIRE_IMG_OK = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[6]/li[1]/img");
	public final static By NEW_HIRE_IMG_VOID = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[6]/li[2]/img");
	public final static By NEW_HIRE_IMG_ALERT = By.xpath("//*[@id='ctl44_PanelList']/div[3]/ul[6]/li[3]/img");
	
	public static void enterHRNewHirePage() {
		SpHomePageUtil.enter();
		SpHomePageUtil.enterHRNewHirePage();
	}
	
	public static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				NEW_HIRE_LINK_NEW,NEW_HIRE_SELECT_SCOPE,NEW_HIRE_IMG_OK, NEW_HIRE_IMG_VOID, NEW_HIRE_IMG_ALERT
			});
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(NEW_HIRE_LINK_NEW));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(NEW_HIRE_SELECT_SCOPE));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(NEW_HIRE_IMG_OK));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(NEW_HIRE_IMG_VOID));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(NEW_HIRE_IMG_ALERT));
	}

}
